package com.mths.client.dto;

public class DocTypeDTO extends BasicDTO {

	private static final long serialVersionUID = -8494258187242038532L;

	private String objid;

	private String docClassOid;

	private String docTypeName;

	public DocTypeDTO() {
		super();
	}

	public DocTypeDTO(String objid, String docClassOid, String docTypeName) {
		super();
		this.objid = objid;
		this.docClassOid = docClassOid;
		this.docTypeName = docTypeName;
	}

	public String getObjid() {
		return objid;
	}

	public void setObjid(String objid) {
		this.objid = objid;
	}

	public String getDocClassOid() {
		return docClassOid;
	}

	public void setDocClassOid(String docClassOid) {
		this.docClassOid = docClassOid;
	}

	public String getDocTypeName() {
		return docTypeName;
	}

	public void setDocTypeName(String docTypeName) {
		this.docTypeName = docTypeName;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((docClassOid == null) ? 0 : docClassOid.hashCode());
		result = prime * result + ((docTypeName == null) ? 0 : docTypeName.hashCode());
		result = prime * result + ((objid == null) ? 0 : objid.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		DocTypeDTO other = (DocTypeDTO) obj;
		if (docClassOid == null) {
			if (other.docClassOid != null)
				return false;
		} else if (!docClassOid.equals(other.docClassOid))
			return false;
		if (docTypeName == null) {
			if (other.docTypeName != null)
				return false;
		} else if (!docTypeName.equals(other.docTypeName))
			return false;
		if (objid == null) {
			if (other.objid != null)
				return false;
		} else if (!objid.equals(other.objid))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "DocumentTypeDTO [objid=" + objid + ", docClassOid=" + docClassOid + ", docTypeName=" + docTypeName + "]";
	}

}